$(document).ready(function(){
	var szkf = GetQueryString("szkf");
	var type=GetQueryString("type");
	//初始化藏品列表Table
	createTableOrderBy('#kfglTable','antiques/kfquery.getCangPinList.do?szkf='+szkf+"&type="+type,'id',tblColTitle,{'szkf':szkf});
})
//打开藏品详细对话框
function detailWin(zdjh){
	$("#detailModal").modal("show");
	$("#cpDetailframe").attr("src","zongZhangDetail.html?zdjh="+zdjh+"&type=view");
	$("#detailModal").attr("zdjh",zdjh);
}
var tblColTitle = [{
        field: 'zdjh',
        title: '总登记号',
        sortable:true
    }, {
        field: 'flh',
        title: '分类号',
        sortable:true
    },{
        field: 'cpmc',
        title: '藏品名称',
        sortable:true,
        formatter:function(value,row,index){
//        	return '<a href="zongZhangDetail.html?zdjh='+row.ZDJH+'">'+value+'</a>';
        	  return '<a onclick="detailWin(\''+row.zdjh+'\')">'+value+'</a>';
        }
    }, {
        field: '',
        title: '藏品分类',
        formatter:function(value,row,index){
        	if(row.cpfl3!="")
        		return row.cpfl3;
        	else if(row.cpfl3=="" && row.cpfl2!="")
        		return row.cpfl2;
        	else
        		return row.cpfl1;
        }
    }, {
        field: '',
        title: '时代',
        formatter: function(value,row,index){
        	if(row.sd4!="")
        		return row.sd4;
        	else if(row.sd4=="" && row.sd3!="")
        		return row.sd3;
        	else if(row.sd3=="" && row.sd2!="")
        		return row.sd2;
        	else
        		return row.sd1;
        }
    }, {
        field: 'sjsl',
        title: '实际数量',
        sortable:true
    }, {
        field: 'zksl',
        title: '在库数量',
        sortable:true
    }];